home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Printing / LaserWriter 8 API / New API sample / PSAdobe.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-17  |  3.2 KB  |  156 lines  |  [TEXT/KAHL]

  1. /*
  2.     PSAdobe.h
  3.     
  4. */
  5.  
  6. #ifndef _H_PSAdobe
  7. #define _H_PSAdobe
  8.  
  9. #define kPSAdobeVersion (1)
  10.  
  11. enum {    /* new PrGeneral selectors */
  12.     getPSInfoOp = 10,
  13.     PSIntentionsOp = 11,
  14.     PSAdobeOp = 14,
  15.     PSPrimaryPPDOp = 15
  16. };
  17.  
  18. enum {    /* PSAdobeOp sub id's */
  19.     PSnone = 0,
  20.     PSpict2eps,            /* convert pict -> eps */
  21.     PSFontInfo            /* get info about a font */
  22. };
  23.  
  24. enum {    /* for printerClass field */
  25.     kCUnknown    = 0,
  26.     kCNone        = 1,            /* no TT possible, send type 1 version */
  27.     kCAccept68K    = 2,            /* possible to download scaler (eexec and cexec defined) */
  28.     kCType42    = 3                /* TT built into printer */
  29. };
  30.  
  31. enum {    /* for includeFonts field */
  32.     includeNoFonts = 0,
  33.     includeAllFonts,
  34.     includeAllBut13
  35. };
  36.  
  37. enum {    /* for color field */
  38.     kBlackAndWhite = 0,
  39.     kColor,
  40.     kCalibratedColor
  41. };
  42.  
  43. #define kMaxPSResources (7)
  44. #define kVMusageUnknown (-1)
  45.  
  46. struct TPSAdobe {
  47.     short            iOpCode;
  48.     short            iError;
  49.     long            lReserved;
  50.     short            subId;
  51.     short            version;
  52.     /* common stuff in most cases */
  53.     OSErr            (*op)(char *p, long len);
  54.     unsigned short    binary : 1;
  55.     unsigned short    level2 : 1;
  56.     
  57.     unsigned short    reserved : 14;
  58.     unsigned short    appFlags;
  59.     
  60.     union {
  61.         struct {
  62.             PicHandle        pict;
  63.             Ptr             getPicProc;
  64.             long            includeFonts;
  65.             StringPtr        title;
  66.             unsigned short    unlimitedFonts : 1;
  67.             unsigned short    textSmoothing : 1;
  68.             unsigned short    graphicsSmoothing : 1;
  69.             unsigned short    color : 2;
  70.             unsigned short    fontSubstitution : 1;
  71.             
  72.             unsigned short    reserved : 10;
  73.         } pict2eps;
  74.         struct {
  75.             short            id;
  76.             unsigned short    style;
  77.             Str63            psName;                        /* in/out */
  78.             unsigned char    printerClass;
  79.             unsigned char    calcVMusage : 1;            /* in */
  80.             
  81.             unsigned char    postScript : 1;                /* out */
  82.             unsigned char    hasPSOutline : 1;            /* out */
  83.             unsigned char    trueType : 1;                /* out */
  84.             unsigned char    multipleMaster : 1;            /* out */
  85.             
  86.             unsigned char    reserved : 3;
  87.             
  88.             unsigned short    fontClass;                    /* out */
  89.             Style            satisfied;                    /* out */
  90.  
  91.             unsigned short    nResources;                    /* out */
  92.             unsigned short    resource[kMaxPSResources];    /* out */
  93.             struct TPSAdobe **data;                        /* in/out */
  94.         } fontInfo;
  95.         struct {
  96.             long VMusage;                                /* out */
  97.             short count;    /* # of ref's to the resource */    /* out */
  98.         } fromFontInfo;
  99.     } is;
  100. };
  101.  
  102. typedef struct TPSAdobe TPSAdobe;
  103.  
  104. #define kPSInfoVersion 1
  105.  
  106. enum {    /* typeOfSave */
  107.     kSavePSUnknown = -1,
  108.     kSavePSFile = 0,
  109.     kSaveEPSBitMap,
  110.     kSaveEPSPICT,
  111.     kSaveEPSNoPreview
  112. };
  113.  
  114. struct TgetPSInfo {
  115.     short            iOpCode;
  116.     short            iError;
  117.     long            lReserved;
  118.     struct TPrint**    hPrint;
  119.     short            version;
  120.     short            level;
  121.     short            typeOfSave;
  122.     unsigned short    printToFile : 1;    /* if true, typeOfSave indicates which kind of file */
  123.     unsigned short    binary : 1;
  124.     unsigned short    reserved : 14;        /* should be zero */
  125. };
  126.  
  127. typedef struct TgetPSInfo TgetPSInfo;
  128.  
  129. #define kPSIntentionsVersion 1
  130.  
  131. struct TPSIntentions {
  132.     short            iOpCode;
  133.     short            iError;
  134.     long            lReserved;
  135.     struct TPrint**    hPrint;
  136.     short            version;
  137.     short            level;
  138.     unsigned short    binary : 1;
  139.     unsigned short    reserved : 15;        /* should be zero */
  140. };
  141.  
  142. typedef struct TPSIntentions TPSIntentions;
  143.  
  144. struct TPSPrimaryPPD {
  145.     short            iOpCode;
  146.     short            iError;
  147.     long            lReserved;
  148.     short            ppdIsRealFile;
  149.     FSSpec            ppdFile;
  150. };
  151.  
  152. typedef struct TPSPrimaryPPD TPSPrimaryPPD;
  153.  
  154.  
  155. #endif PSAdobePublic
  156.